import {request} from "@@/plugin-request/request";
import type {DictItem} from "umi";


export async function findChildData(parentId=0) {
  return request<API.ResultWithPage<DictItem>>(`/cmn/dict/findChildData/${parentId}`, {
    method:'GET'
  })
}

export async function addDictNode(data: Partial<DictItem>) {
  return request<API.ResultWithPage<null>>(`/cmn/dict`, {
    method:'POST',
    data
  })
}

export async function updateDictNode(data: Partial<DictItem>) {
  return request<API.ResultWithPage<null>>(`/cmn/dict`, {
    method:'PUT',
    data
  })
}
